{extend name="../../base/view/common/base" /}
{block name="style"}
<style>
.log-timeline{ position: relative; padding-left: 48px; background-color:#fff;}
.log-timeline:after {content: ""; position: absolute; top: 0; left: 24px; width: 1px; height: 100%; background: #e3e9ed;}
.layui-td-gray{width:15%}
</style>
{/block}
{block name="body"}
<div class="layui-form p-page">
	<h3 class="pb-3">
	案件详情【{$detail.case_code}】<input type="hidden" id="case_id" value="{$id}">	
	</h3>
	<table class="layui-table layui-table-form">
	  <tr>
		<td class="layui-td-gray">案件类型</td>
		<td>{$detail.case_type}</td>
		<td class="layui-td-gray">代理阶段</td>
		<td>{$detail.stage}</td>
		<td class="layui-td-gray">当前进度</td>
		<td>{$detail.status}</td>
	  </tr>
	  <tr>
		<td class="layui-td-gray">管辖法院</td>
		<td colspan="3">{$detail.court_name}</td>
	  <tr>
		<td class="layui-td-gray">案由</td>
		<td>{$detail.case_cause_name}</td>
		<td class="layui-td-gray">受理日期</td>
		<td>{$detail.entrust_date}</td>
		<td class="layui-td-gray">最后更新</td>
		<td>{$detail.update_time|date='Y-m-d H:i:s'}</td>
	  </tr>
	  <tr>
		<td class="layui-td-gray">开庭日期</td>
		<td>{$detail.session_time|date='Y-m-d H:i:s'}</td>
		<td class="layui-td-gray">开庭处所</td>
		<td>{$detail.session_court_name}</td>
	  </tr>
	  <tr>
		<td class="layui-td-gray">案件描述</td>
		<td colspan="5">{$detail.description}</td>
	  </tr>
	</table>

		<div class="body-table layui-tab layui-tab-brief bg-white" lay-filter="caseTab" id="caseTab">
				<ul class="layui-tab-title border">
					<li class="layui-this" data-load="true">代理律师</li>
					<li>当事人</li>
					<li>进度记录</li>
					<li>相关文档</li>
				</ul>
				<div class="layui-tab-content" style="padding:0;">
					<div class="layui-tab-item  layui-show">
						{include file="/lawcase/view_lawyer" /}
					</div>
					<div class="layui-tab-item">
						{include file="/lawcase/view_party" /}
					</div>
					<div class="layui-tab-item">
						{include file="lawcase/view_progress" /}
					</div>
					<div class="layui-tab-item">
						{include file="/lawcase/view_doc" /}
					</div>
				</div>
			</div>
</div>
{/block}

{block name="script"}
<script>
const case_id = '{$id}';
function gouguInit() {
	var table = layui.table, element = layui.element,
            form = layui.form,
            layer = layui.layer,
            oaPicker = layui.oaPicker;
			initLawyer();

		element.on('tab(caseTab)', function(data){
			var index = data.index;
			//if(index === 0) initLawyer();
			if(index === 1) partyInit();
			if(index === 2) progressInit();
			if(index === 3) docInit();
		});
}
</script>
{/block}